package org.liuqm.simplefactory;


/**
 * 简单工厂
 */
public class SimpleFactory {


    public static Print createPrint(String printType) {
        Print result = null;

        switch (printType) {
            case "blackwhite":
                System.out.println("我获取黑白磨具");
                System.out.println("进行生产");
                System.out.println("组装");
                System.out.println("质检");


                result = new BlackWhitePrint();
                break;
            case "color":

                System.out.println("我获取彩色磨具");
                System.out.println("进行生产");
                System.out.println("组装");
                System.out.println("质检");

                result = new ColorPrint();
                break;

        }
        return result;

    }



}
